package com.kefu.chat.vo;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.kefu.chat.model.ChatFaqGroup;
import com.kefu.common.context.KefuContext;
import com.kefu.common.vo.AbstractSearchVo;
import lombok.Data;

@Data
public class ChatFaqGroupSearchVo extends AbstractSearchVo {

    @Override
    public LambdaQueryWrapper<ChatFaqGroup> lambdaQuery() {
        LambdaQueryWrapper<ChatFaqGroup> wrapper = Wrappers.lambdaQuery(ChatFaqGroup.class);
        wrapper.eq(ChatFaqGroup::getTenantId, KefuContext.getKefuContext().getTenantId());
        wrapper.orderByDesc(ChatFaqGroup::getUpdateTime);
        return wrapper;
    }
}
